/*
 * Script.java
 *
 * Created on November 2, 2007, 10:25 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package filecopier.script;

import java.io.File;
import java.io.IOException;
import java.util.List;
import custom.xml.DOMHelperException;

/**
 *
 * @author david
 */
public interface Script {

    public static enum ScriptType {

        Copy, Restore
    }

    public void init() throws IOException, DOMHelperException;

    public void validate() throws DOMHelperException, IOException;

    public boolean addScriptEntry(final ScriptEntry scriptEntry);

    public int addScriptEntries(final ScriptEntry[] scriptEntry);

    public boolean removeScriptEntry(final ScriptEntry scriptEntry);

    public int removeScriptEntries(final ScriptEntry[] scriptEntry);

    public boolean moveScriptEntry(final ScriptEntry scriptEntry, int newIdx);

    public boolean insertScriptEntry(final ScriptEntry scriptEntry, int idx);

    public ScriptEntry getScriptEntry(int idx);

    public ScriptEntry getScriptEntry(final ScriptEntry.PathType pathType, final String pathStr);

    public int getScriptEntryIdx(final ScriptEntry.PathType pathType, final String pathStr);

    public List<ScriptEntry> getScriptEntries();

    public List<ScriptEntry> getScriptEntries(final ScriptEntry.PathType pathType);

    public List<ScriptEntry> getScriptEntries(final ScriptEntry.SavedState savedState);

    public String getScriptName();

    public File getScriptFile();

    public void saveToDisk() throws DOMHelperException;

    public void saveToDisk(File newScriptFile) throws IOException, DOMHelperException;

    public void saveToDisk(File newScriptFile, boolean tempScript) throws IOException, DOMHelperException;

    public boolean isTemp();

    public void setTemp(boolean temp);
}

